package top.tangyh.lamp.care.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import top.tangyh.basic.base.mapper.SuperMapper;
import top.tangyh.lamp.care.entity.BPgRecordDetail;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * 评估评分明细
 * </p>
 *
 * @author zqb
 * @date 2024-07-08 16:40:03
 * @create [2024-07-08 16:40:03] [zqb] [代码生成器生成]
 */
@Repository
public interface BPgRecordDetailMapper extends SuperMapper<BPgRecordDetail> {

    default void deleteByPgRecordId(Long pgId){
        LambdaQueryWrapper<BPgRecordDetail> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(BPgRecordDetail::getPgRecordId,pgId);
        this.delete(queryWrapper);
    }

    default void deleteByPgRecordIds(List<Long> ids){
        LambdaQueryWrapper<BPgRecordDetail> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.in(BPgRecordDetail::getPgRecordId,ids);
        this.delete(queryWrapper);
    }
}


